package com.xinke.module.system.model.vo.oauth2;

import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.xinke.component.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static com.xinke.component.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - OAuth2 授权码分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OAuth2CodePageReqVO extends PageParam {

    @Schema(description = "用户编号", example = "8307")
    private Long userId;

    @Schema(description = "用户类型", example = "1")
    private Integer userType;

    @Schema(description = "授权码")
    private String oauthCode;

    @Schema(description = "客户端编号")
    private String clientNo;

    @Schema(description = "授权范围")
    private String authScope;

    @Schema(description = "过期时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] expiresTime;

    @Schema(description = "可重定向的 URI 地址")
    private String redirectUri;

    @Schema(description = "状态")
    private String codeState;

}